//
//  UPShopingCartMOdel.m
//  LoveFreshBee
//
//  Created by wyzc on 16/6/16.
//  Copyright © 2016年 叶落知秋. All rights reserved.
//

#import "UPShopingCartMOdel.h"
#import "UPOrderProductModel.h"

@implementation UPShopingCartMOdel

-(instancetype)initWithProductModel:(UPOrderProductModel *)productModel
{
    self=[super init];
    if (self) {
        self.iid=[productModel.product_id intValue];
        self.img=productModel.img;
        self.price=productModel.price;
        self.name=productModel.name;
        self.num=1;
        self.selected=YES;
    }
    return self;
}


+(instancetype)shopingModelWithProductModel:(UPOrderProductModel *)productModel
{
    return [[self alloc]initWithProductModel:productModel];
}
@end
